package cj.com.chabaike.dao;

import android.content.Context;
import android.content.SharedPreferences;

public class SharedPerfomentDAO {

	static SharedPreferences sp;
	static SharedPerfomentDAO dao = new SharedPerfomentDAO();
	
	private SharedPerfomentDAO() {
	}
	
	public static SharedPerfomentDAO getInstance(Context c){
		sp = c.getSharedPreferences("chabaike", Context.MODE_PRIVATE);
		return dao;
	}
	
	
	public String getValue(String key){
		return sp.getString(key, "0");
	}
	
	public void putValue(String key,String value){
		sp.edit().putString(key, value).commit();
	}
	
	
	
	
}
